package cn.jiawei.jsql.config;

/**
 * @author : willian fu
 * @version : 1.0
 * @date : 2020/12/18 14:02
 * 服务器信息配置
 */
public class ServerConfig {

    //服务器启动端口
    public final static int PORT = 8848;

    //服务器协议版本号
    public final static byte PROTOCOL_VERSION = 0x10;

    //服务器版本信息
    public final static byte[] VERSION_INFO = "jsql 1.0".getBytes();

    //允许最大客户端连接数
    public final static int MAX_CLIENT = 100;

    //心跳失活检测周期 S 超时就断开连接
    public final static int HEARTBEAT = 6000;

    //响应超时时间 S，所有sql执行超过此时间未响应则判断超时
    public final static int RESPONSE_TIMEOUT = 60;

    //写入硬盘并且从硬盘加载 默认
    public final static boolean TO_DISK = true;

    //数据存储路径，数据库/表
    public final static String DATA_PATH = "D:\\jsql\\data";

    //日志存储路径
    public final static String LOG_PATH = "D:\\jsql\\log";

    //默认用户名
    public final static String DEFAULT_USER = "root";

    //默认密码
    public final static String DEFAULT_PSW = "willianfu";
}
